package com.ruoyi.car.controller.parts;

import com.ruoyi.car.service.parts.ITbPartSimRecordService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * sim卡更改记录模块
 */
@Controller
@RequestMapping("/simrecord")
public class TbPartSimRecordController extends BaseController {
    @Autowired
    private ITbPartSimRecordService iTbPartSimRecord;

    private String prefix = "system/carparts/simrecord";

    @RequiresPermissions("part:simrecord:view")
    @GetMapping()
    public String sim(){
        return prefix +"/simrecord";
    }

    @PostMapping("/simRecordList")
    @ResponseBody
    public TableDataInfo simRecordList(com.car.pojo.TbPartSimRecord tbPartSimRecord){
        startPage();
        List<com.car.pojo.TbPartSimRecord> tbPartSimRecords = this.iTbPartSimRecord.simRecordList(tbPartSimRecord);
        return getDataTable(tbPartSimRecords);
    }
}
